S100 Computers

Home S-100 Boards History New Boards Software Forum Boards For Sale Web Sites Quiz  Index

 
A Z80 Monitor Program
     

My first computer was centered around the TDL system monitor board. This very useful S-100 board had a wonderful Z80 monitor in its custom 4K ROM. It was called "Zapple". It was an extension of an 8080 monitor program written by Roger Amidon called "Apple" back in the mid 70's. It had all the basic requirements such as allowing the user to examine/modify RAM or IO ports. Output to a console, printer, punch, tape reader (these were the Teletype days) or cassette recorder.  It was really the first to do the obvious, namely have all jump calls at the start of the program - for easy access by other programs and allow redirection of output by changing an "IOBYTE" stored in an IO port.

SMB Board

Over the years this monitor code has been copied and modified many times over by others. I too have extensively modified it to incorporate things like booting the first sector of a floppy disk to load CPM. Or doing the same thing for my hard disk. I even have code in there to direct output to my speech synthesizer, run a date/clock chip etc.  I no longer use the origional SMB, instead the monitor now resides in the EEPROM of the S100Computers Z80 CPU Board.
 
I am enclosing the complete source code for the monitor  here
The source code itself can be downloaded by clicking on  master (V4.57).zip

 

MASTER.Z80
The above ROM based monitor normally resides at 0F000H. However for testing purposes it can be assembled to run at 100H where it should run in a CPM system with no conflicts. The monitor is really split into two 2K sections. The first section contains a table for  all the "normal" monitor jump options like displaying or modifying memory or ports.  The second section at 0F800H contains a jump table for CPM BIOS routines. Some of my older (pre-CPM3) software counts on these locations being there.  The monitor resided in a 2732 PROM chip on a Intersystems Z80 CPU board. As with any such monitor there are some extremely hardware specific sections. Major sections consist of the following:-

  Master Monitor ON LCD

Setup all equates for ports and memory locations
The main Jump table to routines within the monitor
The A-Z command jump table
Initialization of serial and parallel ports (LED's on a IMSAI PIO board light up one by one as sections are completed)
Send a text string to consol.  String in [HL]
Get highest RAM location
Various parameter processing routines
Keyboard input routine
Consol output routine
Consol status routine
Printer status and output
Boot CPM from hard disk (8255 driven IDE Drives or CF Cards)
Display a memory map of 64K
Display memory map for any segment up to 1 MG.
Query ports
Dsiaply all active ports from (0 to FFH)
Test RAM
Move and verify memory
Switch in another CPU (8086 or 80286)

At F800H, Jump table for CPM BIOS
Boot CPM from a floppy
CPM required routines
Boot MSDOS
Get Time from a 58167 clock chip
Hex math routines
Display ASCII in RAM
Send a string via ACIA to a speech chip
IO from a serial port/modem

 
 
As you can see the program is written in Z80 code. It should assemble with almost any Z80 assembler. In the past I used the SD Systems assembler simply because that's what I started with. It has a slight quirk in that the data fields "DB", "DW" require "DEFB" and "DEFW". The good news is that strings can be written with "DEFM".  I also used the Cromemco Assembler, but that one has a quirk in that it will not accept names with "$" or "_" character.  

I have now switched over all my stuff to the SLR Z80 assembler. Kicking myself i did not do this earlier!  It is extremly fast and produces .COM or .HEX files directly.   To review and download a CPM assembler go here.

 

This page was last modified on 07/08/2011